﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true" CodeFile="Dashboard.aspx.cs" Inherits="Dashboard" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript">
        function fn_ConfirmForPaymentReceive(CandidateID) {
            debugger;
            if (confirm('Did you received payment ?') == true) {
                document.getElementById('hdnPaymentCandidateID').value = CandidateID;
            }
            else
                return false;
        }
        function onClickLinkDesireAttribute(strPathProDoc) {
            WindowObjectReference = window.open(strPathProDoc, "DescriptiveWindowName", "resizable=yes,scrollbars=yes,status=yes");

        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <table style="width: 100%;">
        <tr>
            <td>
                <%-- <h2>Workflow Dashboard - Level 1</h2>--%>
                <asp:Label ID="lblHeadmsg" runat="server" Text="Label" Font-Size="20" Font-Bold="true"></asp:Label>
                <asp:HiddenField ID="hdnPaymentCandidateID" runat="server" ClientIDMode="Static" />
            </td>
        </tr>
        <tr style="vertical-align: top;">
            <td style="vertical-align: top;" align="center">
                <div>
                    <asp:GridView ID="gvRegistrationStatusDashboard" runat="server" DataKeyNames="StatusID"
                        PageSize="50" AllowPaging="True" Width="75%"
                        AutoGenerateColumns="False" OnPageIndexChanging="gvRegistrationStatusDashboard_PageIndexChanging"
                        OnRowCommand="gvRegistrationStatusDashboard_RowCommand" HeaderStyle-Height="30px">
                        <Columns>
                            <%--  <asp:BoundField DataField="UserID" HeaderText="User ID" Visible="false">
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>--%>
                            <asp:BoundField DataField="StatusID" HeaderText="Status ID" Visible="false">
                                <ItemStyle Width="20%" HorizontalAlign="Left" />
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="StatusCode" HeaderText="&nbsp;&nbsp;Registration Status">
                                <ItemStyle Width="70%" HorizontalAlign="Left" />
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CNT" HeaderText="&nbsp;&nbsp;Count">
                                <ItemStyle Width="15%" HorizontalAlign="right" />
                                <HeaderStyle HorizontalAlign="right" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="&nbsp;&nbsp;View">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnDetails" CommandArgument='<%# Eval("StatusID") %>'
                                        CommandName="Details" runat="server" Text="Details" CausesValidation="false" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#CCCCCC" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                </div>
                <div>
                    <br />
                    <asp:Label ID="lblPaymentConfirmation" runat="server" Text="Candidate Payment Confirmation" Font-Size="10" Font-Bold="true" Visible="false"></asp:Label>
                    <br />
                    <asp:GridView ID="gvPaymentConfirmation" runat="server" DataKeyNames="CandidateID"
                        PageSize="50" AllowPaging="True" Width="95%" OnRowDataBound="gvPaymentConfirmation_RowDataBound"
                        AutoGenerateColumns="False" OnPageIndexChanging="gvRegistrationStatusDashboard_PageIndexChanging"
                        HeaderStyle-Height="30px">
                        <Columns>
                            <asp:BoundField DataField="CandidateID" HeaderText="CandidateID" />
                            <asp:BoundField DataField="CandidateName" HeaderText="&nbsp;&nbsp;Candidate">
                                <ItemStyle Width="30%" HorizontalAlign="Left" />
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="RegistrationNo" HeaderText="&nbsp;&nbsp;Registration ID">
                                <ItemStyle Width="30%" HorizontalAlign="Left" />
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="PaymentDate" HeaderText="&nbsp;&nbsp;Paid Date" DataFormatString="{0:dd-MMM-yyyy}">
                                <ItemStyle Width="20%" HorizontalAlign="right" />
                                <HeaderStyle HorizontalAlign="right" />
                            </asp:BoundField>
                            <asp:BoundField DataField="PaymentAmount" HeaderText="&nbsp;&nbsp;Fees">
                                <ItemStyle Width="8%" HorizontalAlign="right" />
                                <HeaderStyle HorizontalAlign="right" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="&nbsp;&nbsp;Action">
                                <ItemTemplate>
                                    <asp:Button ID="btnPaymentRec" runat="server" OnClick="btnPaymentRec_Click" ClientIDMode="Static" Text="Payment Received" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#CCCCCC" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>

                </div>
            </td>

            <td style="vertical-align: top;" align="center">
                <asp:GridView ID="gvCandidateDetails" runat="server" DataKeyNames="CandidateID"
                    PageSize="10" AllowPaging="true" Width="75%" OnRowCommand="gvCandidateDetails_RowCommand"
                    AutoGenerateColumns="false" HeaderStyle-Height="30px">
                    <Columns>
                        <asp:BoundField DataField="CandidateID" HeaderText="Candidate ID" Visible="false">
                            <ItemStyle HorizontalAlign="Left" Width="10%" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="BriefID" HeaderText="Status ID" Visible="false">
                            <ItemStyle Width="0%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="BriefTitle" HeaderText="&nbsp;&nbsp;Brief Title">
                            <ItemStyle Width="20%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="BriefDesc" HeaderText="&nbsp;&nbsp;Brief Description">
                            <ItemStyle Width="60%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <%--    <asp:HyperLink  DataNavigateUrlFields="BriefID" DataNavigateUrlFormatString="<%= GetBreifUrl(Eval("ActivityCode")) %>?briefid={0}" HeaderText="Details" Text="Details" ItemStyle-Width="2%" ItemStyle-HorizontalAlign="Center"/>--%>
                        <asp:TemplateField HeaderText="&nbsp;&nbsp;View" ItemStyle-Width="20%">
                            <ItemTemplate>
                                <asp:HyperLink runat="server"
                                    NavigateUrl='<%# 
                                        GetBriefUrl(Eval("ActivityCode"),Eval("BriefID"),Eval("IsAccrediationCompleted"),Eval("IsActive"),Eval("CandidateID"))%>'
                                    Text='<%# Eval("DisplayType") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>

                    </Columns>
                    <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />

                    <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
                    <EmptyDataTemplate>
                        Next Step: Brief will be assigned to you shortly.Please wait.......
                               

                    </EmptyDataTemplate>


                </asp:GridView>
                <br />
                <div>
                    
                    <asp:GridView ID="gvDesiredAttributes" runat="server" AutoGenerateColumns="False">
                        <Columns>
                            <asp:BoundField DataField="DesiredAttributesDoc" HeaderText="Candidate Assessment Attribute" />
                            <asp:TemplateField ItemStyle-Width="10%">
                                <ItemTemplate>
                                    <asp:HyperLink runat="server" NavigateUrl='<%# GetDesiredAttributesDownload(Eval("DesiredAttributesDoc"))%>' Text="Download" HorizontalAlign="Left"></asp:HyperLink>

                                </ItemTemplate>

                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
            </td>

            <td style="vertical-align: top;" align="center">
                <asp:GridView ID="gvPaymentStatus" runat="server" DataKeyNames="StatusID"
                    PageSize="50" AllowPaging="True" Width="75%"
                    AutoGenerateColumns="False"
                    OnRowCommand="gvPaymentStatus_RowCommand" HeaderStyle-Height="30px">
                    <Columns>
                        <%--  <asp:BoundField DataField="UserID" HeaderText="User ID" Visible="false">
                                    <ItemStyle HorizontalAlign="Left" Width="10%"/>
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>--%>
                        <asp:BoundField DataField="StatusID" HeaderText="Status ID" Visible="false">
                            <ItemStyle Width="20%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="StatusCode" HeaderText="&nbsp;&nbsp;Payment Status">
                            <ItemStyle Width="60%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CNT" HeaderText="&nbsp;&nbsp;Count">
                            <ItemStyle Width="20%" HorizontalAlign="right" />
                            <HeaderStyle HorizontalAlign="right" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="&nbsp;&nbsp;View">
                            <ItemTemplate>
                                <asp:LinkButton ID="btnDetails" CommandArgument='<%# Eval("StatusID") %>'
                                    CommandName="Details" runat="server" Text="Details" CausesValidation="false" />
                            </ItemTemplate>

                        </asp:TemplateField>

                    </Columns>
                    <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />

                </asp:GridView>
                <br />
                <br />
                <asp:Label ID="lblgvAssessorCalenderWithCandidate" runat="server" Text="Assessor Calender with Candidates" Font-Size="10" Font-Bold="true"></asp:Label>
                <br />
                <asp:GridView ID="gvAssessorCalenderWithCandidate" runat="server" OnRowDataBound="gvAssessorCalenderWithCandidate_RowDataBound"
                    PageSize="50" AllowPaging="True" Width="90%" AutoGenerateColumns="False" HeaderStyle-Height="30px" OnPageIndexChanging="gvAssessorCalenderWithCandidate_PageIndexChanging" OnRowCommand="gvAssessorCalenderWithCandidate_RowCommand">
                    <Columns>
                        <asp:BoundField DataField="AlternateRow" HeaderText="" Visible="false" />
                        <asp:BoundField DataField="GDDateTime" HeaderText="Assessor Date" DataFormatString="{0:dd-MMM-yy hh:mm tt}">
                            <ItemStyle Width="50%" HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Candidate" HeaderText="Candidate">
                            <ItemStyle Width="50%" HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CandidateId" HeaderText="CandidateId" Visible="False" />
                        <asp:TemplateField HeaderText="&nbsp;&nbsp;View">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnDetails" CommandArgument= '<%#Eval("CandidateID") + ";" +Eval("CandidateBriefID")+ ";" +Eval("Candidate")+ ";" +Eval("BriefID")%>'
                                        CommandName="CalendarDetails" runat="server" Text="Details" CausesValidation="false" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        <asp:BoundField DataField="CandidateBriefId" HeaderText="CandidateBriefId" Visible="False" />
                        <asp:BoundField DataField="BriefId" HeaderText="BriefId" Visible="False" />
                    </Columns>
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                </asp:GridView>

                <asp:Label ID="lblAssessorBookedForAdmin" runat="server" Text="Assessor Booked Dates" Font-Size="10" Visible="false" Font-Bold="true"></asp:Label>
                <br />
                <asp:GridView ID="gvAssessorBookedForAdmin" runat="server" OnRowDataBound="gvAssessorBookedForAdmin_RowDataBound"
                    PageSize="50" AllowPaging="True" Width="90%" AutoGenerateColumns="False" HeaderStyle-Height="30px">
                    <Columns>
                        <asp:BoundField DataField="AlternateRow" HeaderText="" Visible="false" />
                        <asp:BoundField DataField="AssessorName" HeaderText="Assessor"></asp:BoundField>
                        <asp:BoundField DataField="Location" HeaderText="Location"></asp:BoundField>
                        <asp:BoundField DataField="MonthDesc" HeaderText="Month"></asp:BoundField>
                        <asp:BoundField DataField="BookedDates" HeaderText="Booked Days"></asp:BoundField>
                    </Columns>
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
            </td>
        </tr>
        </table>
</asp:Content>

